const { next } = require("cheerio/lib/api/traversing")
const express=require("express")
const router=express.Router()
const bokeServ=require("../../services/mood")
require("../../models/relation")
const {
    asyncHandler
}=require("../getSendResult")

router.get("/",asyncHandler(async(req,res,next)=>{
    console.log(req.query)
    const page=req.query.page||1;
    const limit=req.query.limit||5;
    return await bokeServ.getfenye(page,limit);
}))

router.post("/getpl",asyncHandler(async(req,res,next)=>{
    console.log(req.body)
    const page=req.body.page||1;
    const limit=req.body.limit||4;
    const result=await bokeServ.getPl(page,limit)
    return result;
}))
router.get("/getall",asyncHandler(async(req,res,next)=>{
    const result=await bokeServ.getboke()
    return result;
}))
module.exports=router